package blockQueue;

import java.util.concurrent.BlockingDeque;
import java.util.concurrent.LinkedBlockingDeque;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: 74646
 * Date: 2022-05-14
 * Time: 16:47
 */
public class Demo1 {
    public static void main(String[] args) {
        BlockingDeque<String> blockingDeque = new LinkedBlockingDeque<>();
        try {
            blockingDeque.put("hello");//入队列
            String s = blockingDeque.take();//出队列
        } catch (InterruptedException e) {
            e.printStackTrace();
        }
    }
}
